﻿<!--
  
   NewCivWindow.xaml
  
   Copyright (c) 2007 Mike Strobel
  
   This source code is subject to the terms of the Microsoft Reciprocal License (Ms-RL).
   For details, see <http://www.opensource.org/licenses/ms-rl.html>.
  
   All other rights reserved.
  
  -->
<Window x:Class="Supremacy.Editor.NewCivWindow"
        xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="New Civilization"
        SizeToContent="WidthAndHeight" 
        WindowStartupLocation="CenterOwner"
        WindowStyle="ThreeDBorderWindow"
        ResizeMode="NoResize">

  <Grid Margin="6">

    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto"/>
      <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>

    <Label Grid.Column="0"
           Grid.Row="0"
           Margin="0,3,2,3"
           FontWeight="Bold"
           Content="Identity:"/>

    <TextBox x:Name="IdentityText"
             Grid.Column="1"
             Grid.Row="0"
             Margin="2,3,2,3"
             Width="128"
             HorizontalAlignment="Left"
             CharacterCasing="Upper" />

    <Label Grid.Column="0"
           Grid.Row="1"
           Margin="0,3,2,3"
           FontWeight="Bold"
           Content="Short Name:"/>

    <TextBox x:Name="ShortNameText"
             Grid.Column="1"
             Grid.Row="1"
             Margin="2,3,2,3"
             Width="128"
             HorizontalAlignment="Left"/>

    <Label Grid.Column="0"
           Grid.Row="2"
           Margin="0,3,2,3"
           FontWeight="Bold"
           Content="Long Name:"/>

    <TextBox x:Name="LongNameText"
             Grid.Column="1"
             Grid.Row="2"
             Margin="2,3,2,3"
             Width="256"
             HorizontalAlignment="Left"/>


    <StackPanel Grid.Column="1"
                Grid.Row="3"
                Orientation="Vertical"
                HorizontalAlignment="Left">
      <RadioButton x:Name="ExistingRaceButton"
                   GroupName="RaceRadioGroup"
                   Content="Use an existing race"
                   IsChecked="True"/>
      <ComboBox x:Name="RaceList"
                Margin="16,3,0,3"
                IsEnabled="{Binding ElementName=ExistingRaceButton, Path=IsChecked}"/>
      <RadioButton x:Name="NewRaceButton"
                   GroupName="RaceRadioGroup"
                   Content="Create a new race" 
                   IsChecked="False"/>
      <Grid x:Name="NewRaceGrid"
            Margin="16,0,0,0"
            IsEnabled="{Binding ElementName=NewRaceButton, Path=IsChecked}">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Label Grid.Column="0"
               Grid.Row="0"
               Margin="0,3,2,3"
               FontWeight="Bold"
               Content="Race Identity:"/>
        <TextBox x:Name="RaceIdentityText"
                 Grid.Column="1"
                 Grid.Row="0"
                 Margin="2,3,2,3"
                 Width="128"
                 HorizontalAlignment="Left"
                 CharacterCasing="Upper" />
        <Label Grid.Column="0"
               Grid.Row="1"
               Margin="0,3,2,3"
               FontWeight="Bold"
               Content="Race Name:"/>
        <TextBox x:Name="RaceNameText"
                 Grid.Column="1"
                 Grid.Row="1"
                 Margin="2,3,2,3"
                 Width="128"
                 HorizontalAlignment="Left"/>
      </Grid>
    </StackPanel>
    

    <StackPanel Grid.Column="0"
                Grid.ColumnSpan="2"
                Grid.Row="4"
                Margin="0,6,0,0"
                Orientation="Horizontal"
                HorizontalAlignment="Center">
      <Button x:Name="AcceptButton"
              IsDefault="True"
              Margin="0,0,3,0"
              Padding="12,2,12,2"
              Content="Accept"
              Click="AcceptButton_Click"/>
      <Button x:Name="CancelButton"
              IsCancel="True"
              Margin="3,0,0,0"
              Padding="12,2,12,2"
              Content="Cancel"/>
    </StackPanel>

  </Grid>

</Window>
